import { useChannels } from "../../hooks"
import { Select } from "antd"
export default function Channels(props) {
  const channels = useChannels()
  return (
    <Select
      style={{ width: 200 }}
      allowClear
      placeholder="请选择频道"
      {...props}
    >
      {channels.map((item) => (
        <Select.Option key={item.id} value={item.id}>
          {item.name}
        </Select.Option>
      ))}
    </Select>
  )
}
